package com.cencat.user.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 令牌响应VO
 * @author cencat
 * @since 2024-01-01
 */
@Data
@Schema(description = "令牌响应")
public class TokenVO {

    @Schema(description = "访问令牌")
    private String accessToken;

    @Schema(description = "刷新令牌")
    private String refreshToken;

    @Schema(description = "令牌类型", example = "Bearer")
    private String tokenType = "Bearer";

    @Schema(description = "令牌过期时间（秒）", example = "7200")
    private Long expiresIn;

    @Schema(description = "刷新令牌过期时间（秒）", example = "604800")
    private Long refreshExpiresIn;

    @Schema(description = "令牌生成时间")
    private LocalDateTime issuedAt;

    @Schema(description = "令牌过期时间")
    private LocalDateTime expiresAt;

    @Schema(description = "作用域", example = "read write")
    private String scope;

    @Schema(description = "用户ID", example = "1")
    private Long userId;

    @Schema(description = "用户名", example = "admin")
    private String username;

    @Schema(description = "租户ID", example = "1")
    private Long tenantId;
}